

import java.util.ArrayList;
import Server.Proxy;
import fit.ActionFixture;

public class CheckOrder extends ActionFixture {
	
	
	Proxy func;
	String userID;
	String itemID;
	String itemCopyID;
	
	public void connection() {
		func = new Proxy("jdbc:mysql://localhost/obl2", "root","");
	}
	public void setID(String id) {
		this.userID=id;
	}
	public void setItemID(String itemID) {
		this.itemID=itemID;
	}
	public void setItemCopyID(String itemCopyID) {
		this.itemCopyID=itemCopyID;
	}


	public String orderAllow() {
		ArrayList<String> result = new ArrayList<String>();
		ArrayList<String> ref = new ArrayList<String>();
		ref.add("orderAllow");
		ref.add(itemID);
		ref.add(userID);
		result=func.orderAllow(ref);
		return result.get(0);
	}
	
	public String order() {
		ArrayList<String> result = new ArrayList<String>();
		ArrayList<String> ref = new ArrayList<String>();
		ref.add("add_newOrder");
		ref.add(userID);
		ref.add(itemID);
		result=func.add_newOrder(ref);
		return result.get(0);
	}
	
	
	
	

}

